package com.zmj.sy.mom.srv.aps.bean.vo.workshop;


import cn.hutool.core.date.DateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
public class WorkshopGetPickDetailResVo {

    @ApiModelProperty("领料单编号")
    private Integer pickingListNo;

    @ApiModelProperty("希望送货日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime wantedDeliveryDate;

    private List<NestPlateInfo> nestPlateInfoList;

    @Getter
    @Setter
    public static class NestPlateInfo {

        @ApiModelProperty(value = "套料顺序")
        private Integer pickListItemNo;

        @ApiModelProperty(value = "物料类型, 1=钢板，2=余料，3=外委件")
        private Integer type;

        @ApiModelProperty(value = "堆垛位置")
        private String storagePlace;

        @ApiModelProperty(value = "层号")
        private Integer sequence;

        @ApiModelProperty(value = "数量")
        private Integer amount;

        @ApiModelProperty(value = "长度")
        private Float length;

        @ApiModelProperty(value = "宽度")
        private Float width;

        @ApiModelProperty(value = "切割指令号")
        private String nesting;

        @ApiModelProperty(value = "物料号")
        private String materialId;

        @ApiModelProperty(value = "下道工位")
        private String nextWorkPlace;

        @ApiModelProperty(value = "钢板利用率")
        private Float plateUsage;

        @ApiModelProperty(value = "钢板重 mes返回")
        private Float plateWeight;

        @ApiModelProperty(value = "钢板零件")
        private List<NestItemInfo> parts;

        @ApiModelProperty(value = "余料")
        private NestPlateClout remnant;

    }

    @Getter
    @Setter
    public static class NestItemInfo {

        @ApiModelProperty(value = "零件 plmid")
        private String name;

        @ApiModelProperty(value = "施工号")
        private String constructNo;

        @ApiModelProperty(value = "工单号")
        private String constructOrderNo;

        @ApiModelProperty(value = "工单号下面的零件数据量")
        private Integer count;

        @ApiModelProperty(value = "零件单重")
        private Float partWeight;

    }

    @Getter
    @Setter
    public static class NestPlateClout {

        @ApiModelProperty(value = "余料编号")
        private String cloutNo;

        @ApiModelProperty(value = "余料重量")
        private Float cloutWeight;

    }

}
